the program included herein hails from the toolbox/documents/irix/userContext.html July 1995 Pipeline article, "Getting and Setting User Context Within a Process".The following program provides an example of using the getcontext(2), setcontext(2) and makecontext(3C) functions introduced in IRIX 5.x. These functions are useful for implementing user level context switching between multiple threads of control within a single IRIX process.
Each thread's context is defined in ucontext(5). A thread's context is maintained and created by the operating system primarily because it includes the signal mask (which is maintained by the operating system).